Skip to content

Fix: Missing zero address validation in permit()#34

Merged
mudgen merged 1 commit into
Perfect-Abstractions:mainfrom
adamgall:fix/permit-validation
Oct 21, 2025
Merged

Fix: Missing zero address validation in permit()#34
mudgen merged 1 commit into
Perfect-Abstractions:mainfrom
adamgall:fix/permit-validation

Conversation

@adamgall

Copy link
Copy Markdown
Collaborator

Fixes #28

The permit() function was missing zero address validation for the spender parameter, allowing gasless approvals to the zero address which violates the ERC-20 standard and EIP-2612 best practices.

This fix adds spender validation at the beginning of permit(), ensuring consistency with the approve() function and preventing invalid permits.

The permit() function was missing zero address validation for the spender
parameter, allowing gasless approvals to the zero address which violates the
ERC-20 standard and EIP-2612 best practices.

This fix adds spender validation at the beginning of permit(), ensuring
consistency with the approve() function and preventing invalid permits.
@mudgen

mudgen commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Thanks for your help with this!

@mudgen mudgen merged commit a30a790 into Perfect-Abstractions:main Oct 21, 2025
@adamgall adamgall deleted the fix/permit-validation branch October 21, 2025 17:55
JackieXu pushed a commit to JackieXu/Compose that referenced this pull request Nov 6, 2025
…alidation

Fix: Missing zero address validation in permit()
maxnorm added a commit that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERC20Facet: permit() allows zero address spender

2 participants